AIRLINES OPERATIONS REPORT¶
Using airlines data from https://www.kaggle.com/datasets/ayushparwal2026/airlines-dataset¶
Goal :¶
- To analyze airlines data, providing insights into the landing counts and total landed weight for various airlines and aircraft types.
- Examine how landing data varies across different GEO regions.
- Identify patterns and trends in landing data based on different aircraft types and manufacturers.
- Create visualizations that stakeholders can use to make informed decisions regarding airline operations
Overview : This dataset contains below fields¶
Operating Airline Operating Airline IATA Code Published Airline Published Airline IATA Code GEO Summary GEO Region Landing Aircraft Type Aircraft Body Type Aircraft Manufacturer Aircraft Model Landing Count Total Landed Weight
In [8]:
# Step 1: Load the Dataset
import pandas as pd
url = "https://shirleymsassignments.github.io/altair/cleaned_air.csv"
data= pd.read_csv(url)
data.head()
Out[8]:
| Operating Airline | Operating Airline IATA Code | Published Airline | Published Airline IATA Code | GEO Summary | GEO Region | Landing Aircraft Type | Aircraft Body Type | Aircraft Manufacturer | Aircraft Model | Landing Count | Total Landed Weight | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | SkyWest Airlines | OO | United Airlines | UA | International | Canada | Passenger | Regional Jet | Bombardier | CRJ2 | 30 | 1410000 |
| 1 | Air Canada | AC | Air Canada | AC | International | Canada | Passenger | Narrow Body | Airbus | A320 | 125 | 17787978 |
| 2 | Japan Airlines | JL | Japan Airlines | JL | International | Asia | Passenger | Wide Body | Boeing | B773 | 30 | 16620000 |
| 3 | COPA Airlines, Inc. | CM | COPA Airlines, Inc. | CM | International | Central America | Passenger | Narrow Body | Boeing | B739 | 3 | 491700 |
| 4 | Hong Kong Airlines Limited | HX | Hong Kong Airlines Limited | HX | International | Asia | Passenger | Wide Body | Airbus | A359 | 16 | 7301712 |
Used below altair charts for visualizations¶
- Bar chart used to compare landing counts across airlines
- scatter plot (Total Landed Weight vs. Landing Count) to visualize correlations and patterns with aircraft types
- Filtered Bar Chart for Specific GEO Region - 'Canada'
- Interactive Selection to interactively explore data for specific airlines
- Scatterplot Matrix (SPLOM):providing insights across multiple variables
Visualization 1: Bar chart¶
Provides a clear visual representation of which airlines have the highest and lowest landing counts, crucial for operational insights and strategic planning¶
In [9]:
import altair as alt
# Disable the max rows limit
alt.data_transformers.disable_max_rows()
alt.Chart(data).mark_bar().encode(x="GEO Region", y="Landing Count")
Out[9]:
Visualization 2: Interactive Line chart of Landing Count by Operating Airline¶
Interactive features such as selection and tooltips enhance user interaction allowing users to explore data dynamically and gain deeper insights.¶
In [10]:
alt.Chart(data).mark_line().encode(
y='Landing Count',
x='Operating Airline',
tooltip=['Operating Airline', 'Landing Count']
).properties(
title='Landing Count by Operating Airline'
).interactive()
Out[10]:
In [ ]:
Visualization 3 : Altair circle chart¶
Focuses on regional insights, allowing users to identify regional trends and tailor strategies accordingly. In this visualization , used region vs. Landing count¶
In [11]:
alt.Chart(data).mark_circle().encode(
x ="GEO Region", y="Landing Count",
color=alt.Color('GEO Region', scale=alt.Scale(scheme='spectral'))
)
Out[11]:
Visualization 4: Filtered bar chart¶
Landing Count by Aircraft Manufacturer for a specific GEO Region¶
In [12]:
geo_region = 'Canada'
alt.Chart(data[data['GEO Region'] == geo_region]).mark_bar().encode(
x='Landing Count',
y='Aircraft Manufacturer',
tooltip=['Aircraft Manufacturer', 'Landing Count']
).properties(
title=f'Landing Count by Aircraft Manufacturer in {geo_region}'
).interactive()
Out[12]:
Visualization 5: Facets¶
Filtered Bar Chart: Landing Count by Aircraft Manufacturer in US¶
This chart shows the landing count distribution for aircraft manufacturers in the US region. Hover over the bars to see detailed information about each manufacturer's landing count.
Interactive Scatter Plot: Landing Count vs. Total Landed Weight¶
This scatter plot allows you to interactively explore the relationship between landing count and total landed weight across different operating airlines. Use the legend to select specific airlines for comparison.
In [13]:
geo_region = 'US'
filtered_chart = alt.Chart(data[data['GEO Region'] == geo_region]).mark_bar().encode(
x='Landing Count:Q',
y=alt.Y('Aircraft Manufacturer:N', sort='-x'),
tooltip=['Aircraft Manufacturer', 'Landing Count']
).properties(
title=f'Landing Count by Aircraft Manufacturer in {geo_region}'
).interactive()
# Visualization 4: Interactive selection for Operating Airline
selection = alt.selection_point(fields=['Operating Airline'], bind='legend')
interactive_chart = alt.Chart(data).mark_point().encode(
x='Landing Count:Q',
y='Total Landed Weight:Q',
color=alt.condition(selection, 'Operating Airline:N', alt.value('lightgray')),
tooltip=['Operating Airline', 'Landing Count', 'Total Landed Weight']
).add_params(
selection
).properties(
title='Interactive Selection for Operating Airline'
)
# Display the charts
filtered_chart | interactive_chart
Out[13]: